from celery import Celery

# include =[] 元素是任务
app = Celery('MyCelery')

# 加载配置文件
app.config_from_object('celery_tasks.celeryconfig')
# 自动发现任务
app.autodiscover_tasks(['celery_tasks.tasks.task.sms_code'])

# celery -A celery_tasks.main worker -l info -P eventlet